//***********************************************************************
//	File:		Enemy.h
//	Author:		
//	Course:		SGP 1405
//	Purpose:	
//***********************************************************************
//***********************************************************************
//	Purposfully left blank for all comments regarding this file 
//	
//	
//	
//***********************************************************************
#include "../SGD Wrappers/SGD_GraphicsManager.h"

#pragma once
#include "Moveable.h"
class Enemy :
	public Moveable
{
public:
	//Trilogy
	Enemy(float posX = 0, float posY = 0);
	virtual ~Enemy() = default;
	Enemy(const Enemy&) = default;
	Enemy& operator =(const Enemy&) = default; 

	//Type 
	int GetType() const { return ENT_ENEMY_BASE; }

	//Interface
	void Update(float dt);
	void Render();
	void HandleCollision(const IEntity* pOther);
	void HandleEvent();
	SGD::Rectangle GetRect() const;
	void ModifyHealth(float hpAmount);
	void ApplyFriction(float dt);
	//Enemy Interface
	void Attack(float dt); 
	void Move(void); 

	//Accessors
	int			GetValue				(void)			{return m_nValue;}
	float		GetConfuseTimer			(void)			{return m_fConfuseTimer;}
	float		GetConfuseCDL			(void)			{return m_fConfuseCDL;}
	float		 GetRootTimer			(void)			{return m_fRootTimer;}
	float		GetRootCDL				(void)			{return m_fRootCDL;}
	float		GetKnockbackTimer		(void)			{return m_fKnockbackTimer;}
	float		GetKnockbackCDL			(void)			{return m_fKnockbackCDL;}
	float		GetAttackRange			(void)			{return m_fAttackRange;}
	Entity*		GetTarget				(void)			{return m_pTarget;}

	//Mutators
	void		SetValue				(int v)			{ m_nValue = v; }
	void		SetConfuseTimer			(float ct)		{ m_fConfuseTimer = ct; }
	void		SetConfuseCDL			(float cCDL)	{ m_fConfuseCDL = cCDL; }
	void		SetRootTimer			(float rt)		{ m_fRootTimer = rt; }
	void		SetRootCDL				(float rCDL)	{ m_fRootCDL = rCDL; }
	void		SetKnockBackTimer		(float kbt)		{ m_fKnockbackTimer = kbt; }
	void		SetKnockbackCDL			(float kCDL)	{ m_fKnockbackCDL = kCDL; }
	void		SetAttackRange			(float ar)		{ m_fAttackRange = ar; }
	
	//Special Mutator
	void		SetTarget(Entity* pTarget);

private:
	int			m_nValue				= -1;
	float		m_fConfuseTimer			= 0.0f;
	float		m_fConfuseCDL			= 0.0f; 
	float		m_fRootTimer			= 0.0f;
	float		m_fRootCDL				= 0.0f;
	float		m_fKnockbackTimer		= 0.0f;
	float		m_fKnockbackCDL			= 0.0f;
	float		m_fAttackRange			= 0.0f; 
	Entity*		m_pTarget				= nullptr; 
};

